home *** CD-ROM | disk | FTP | other *** search
-
-
- ZDIFF v1.2
- The Archive/Directory comparator
-
- Shareware program
- Copyright 1993, Christophe Dubourg
- Date : 1993, May 25
-
- ---*---
-
- Table of contents
-
- 1 ........................Purpose
- 2 ........................ Syntax
- 3 ...................... Features
- 4 .................. How it works
- 5 ........................ Limits
- 6 ....................... Remarks
- 7 .................... Disclaimer
- 8 ..... How to contact the author
-
- ---*---
-
-
-
-
- 1. Purpose :
- ------------
-
- ZDiff is a comparison utility program.
-
- You can compare a pair of archives, or a pair of directories, or
- an archive and a directory. (that's the new of this !)
- You obtain a sorted list of all the files, along with a status
- line, showing the differences, if any.
-
-
- 2. Syntax :
- -----------
-
- ZDIFF <New Archive/Directory> <Old Archive/Directory>
-
- or
-
- ZDIFF <New Archive/Directory> <Old Archive/Directory> [options] [wildcards]
-
-
- Note : To simplify the following, the archive or directory that
- is compared to an other archive or directory will be called a
- Set of files. There is a NEW set of files, and an OLD set of files.
- (to determine the one that is Newer and the one that is Older,
- for instance).
-
- The <New archive/directory> and <Old archive/directory> parameters
- are needed (not optional).
-
- The order in which you specify the New/Old pair is relevant.
- It will make the difference between a 'Deleted' file or 'Inserted'
- file, or a 'Newer' and 'Older', or 'Bigger' and 'Smaller'.
- (In fact, it will determine the output result)
-
- The NEW set of files must be specified first.
- ---------------------------------------------
-
- Then, you may specify options and/or wildcards.
-
- a. Wildcards
-
- The wildcards may be used to restrict the files compared inside
- the directory or archive. (for both the new and old sets, because
- it would be unlogical to have two different wildcards).
- The DOS standard wildcards are allowed.
-
- b. Options
-
- The options may be specified anywhere on the command line, and are
- not case sensitive. The options are :
-
- /c : Country flag override.
-
- If the dates in the ZIP files are not well recognized, you may
- use this option to force the date format to use while reading
- ZIP files :
-
- /C0 - USA date format. (MM/DD/YY)
- /C1 - Swapped date format. (DD/MM/YY)
-
- /d : Differences only.
-
- Once the two sets of files are compared, the output will only show
- the files that have ANY difference in the 2 sets.
- By default, all the files of the two sets are displayed.
-
- /h : Help !
-
- This display more help screens, and a copyright screen.
-
- /p : Pause
-
- With this option, ZDiff will prompt you before reading each set
- of file. The purpose of this is essentially while using floppies.
- For example, if you need to compare two sets that are on two
- different floppies that have the same format, you'll have to insert
- one disk, read the files from it, and then the second disk.
- Maybe, you could compare 2 removable hard disks, or a hard disk
- and an archive, or whatever.
-
- /q : Quick scan
-
- If a directory is involved in comparison, this permits to skip the
- CRC calculation on each file of this directory, in order to
- speed up the process. Of course, use this option with caution,
- since the comparison is made only with TimeStamp and Size !
- (two files can have the same date and time of last modification,
- same size, and be binary different : in this case, they will be
- marked as 'Same').
-
- /r : Recurse directories.
-
- By default, the subdirectories are not searched, either in the
- archive or the directory file structure. (to save time).
- This switch allows the comparison of the full tree of directories.
- Note : if you don't specify the -r option, the filenames that
- contains a path in the archives are not treated at all.
-
- /v : Verbose output
-
- This options causes a status to be output at the end of comparison.
- This report shows the number of files that are :
-
- - Identical
- - Different
- - Newer
- - Older
- - Bigger
- - Smaller
- - Inserted
- - Deleted
-
- It may give an idea of the amount of differences between the two
- sets, without having to analyze the whole output.
-
-
- 3. Features :
- -------------
- Since this is a comparison program, you will probably want to know
- how it compares the two sets of files :
-
- The keys of comparison are :
-
- Name : If two names of the sets don't match, either one is new or one is
- deleted, depending on the order you specified for the comparison.
- if the -r option is specified, the full filename must match.
-
- Once two files are found in both the 2 sets, a more precise
- comparison occurs. The keys for comparison between two files that
- have the same name are :
-
- CRC : A CRC 32 bits calculation is made on the files to know if they are
- absolutely identical or not.
- Note : if one of the files is an archive of type LZH, LHA, ARC or
- ZOO, then a 16 bits calculation is done instead, to match the CRC
- that these archives use.
- If the Quick option is set, no CRC calculation occurs, and files
- are assumed binary identical.
-
- Date : To know which one is the oldest, or the newest.
-
- Size : To know which one is the biggest, or the smallest.
-
-
- 4. How it works
- ---------------
- To compare two directories, you won't need nothing but ZDIFF.EXE.
- But to compare two archives, or an archive and a directory, you'll
- need the correct unarchiver in your PATH, to access the archives
- you have specified.
-
- The program supports all the current archive formats that are
- commonly used and that I am aware of :
-
- ZIP, ARJ, LHA, LZH, PAK, ZOO, ARC.
-
- The needed unarchiver, for each extension is :
-
- *.ZIP PKUNZIP.EXE (v1.10 or v2.04)
-
- *.ARJ ARJ.EXE (v2.30)
-
- *.LHA \
- *.LZH - LHA.EXE (v2.12)
- *.PAK /
-
- *.ZOO ZOO.EXE (v2.1)
-
- *.ARC PKUNPAK.EXE (v3.61)
-
- (each of these can be easily found on many BBS)
-
- Now, here how it works :
- The program first checks if the archive or directory that you
- specified exists. (to prevent an error after some precious seconds
- of calculation). At this points, it decides if a 32 bit or 16 bit
- calculation will occur (or no crc, if Quick mode is set).
- Then, it analyze the NEW set, and then the OLD set.
- Two choices, concerning each set of file :
-
- a. If it's an archive:
-
- The unarchiver is called, to obtain a list of each file in the
- archive, along with the date, crc, size, and so on.
- This list is saved in a temporary file.
- (Using the TEMP environment variable)
- Then, the temporary file is opened, and scanned for each file in it.
- Since all the informations are already calculated by the unarchiver,
- there's nothing to compute (the crc is already there).
-
- If this is NEW files, each file name is stored in memory, along with
- all the informations needed to compare later.
- If this is OLD files, a search is made in memory, to see if the file
- already exists in the NEW directory. If yes, the comparison occurs,
- and the status is updated accordingly. If not, the file information
- is simply stored.
-
- b. If it's a directory:
-
- The directory is scanned, and all the files are opened, to obtain
- the date, time, size, and a CRC calculation occurs.
- (except if the Quick mode is set).
- Each file entry is then treated like the archive file entry :
- if NEW, then the information is just stored. If OLD, the file is
- searched in memory, and then either added or updated in the list.
-
-
- After all the files have been read (the NEW set and the OLD set of
- files), the sorted list is sent to standard output.
- Since you can redirect standard output, you could use this facility
- to pipe the output to a filter program (FIND), or a viewer program
- (LIST), or any filter program of your choice.
-
- Here are some examples :
-
- 1. ZDIFF NEWARC.ZIP OLDARC.ARJ | LIST /S
-
- This display the output via the LIST viewer program.
- (if the archive contains sub-dirs, they are not included,
- since no -r parameter is there).
-
- 2. ZDIFF /r NEWARC.ZIP OLDDIR *.DOC | FIND "Newer" | LIST /s
-
- This display, via list, all the NEW files in NEWARC.ZIP,
- compared to OLDDIR directory and all its sub-dirs.
- Only the .DOC files are processed.
-
- 3. ZDIFF NEWZIP.ZIP . -r -q -c1
-
- This output on screen the differences between the archive
- NEWZIP.ZIP and the current directories, and the subdirectories.
- A Quick scan of directories will be made (no CRC), so comparison
- will be made on date, time and size only.
- The date format used by PKUNZIP on this machine is the swapped
- date format (DD/MM/YY).
-
- 4. ZDIFF -v . -r OLDARC.LHA /d /q
-
- This output on screen the differences between the current
- directory and the archive OLDARC.LHA. Subdirs are scanned also.
- A Verbose (-v) status is displayed at end of comparison.
- Only the differences are shown (/d), and no CRC is calculated.
-
-
- 5. Limits :
- -----------
- All the files informations are stored in DOS memory. (no EMS)
- It permits between 5500 to 9900 files to be stored, depending of
- the path length - this is much enough, I guess.
-
- Note concerning the archives : if the -r option is not specified,
- the files containing a path in their name are not included in the
- comparison. Only the files in the main directory of the archive
- are treated, and only the files in the specified directory are
- specified also.
-
-
- 6. Remarks
- ----------
- I made my possible to make this program free of bugs, but if ever
- something is wrong with ZDIFF, tell me. I'll fix it ASAP.
- Note that I'm aware of no bug at this moment...
-
- Note that ZDiff supports international information from DOS,
- since PKUNZIP does. (it concerns the date format, used for
- time comparison, that is different in US than in France, for
- example). The KEYB country flag is used for this purpose, so you
- don't have to load the NLSFUNC program. If KEYB country flag is
- set, then I assume that DAY/MONTH information in ZIP files will
- be swapped. (compared to US).
- You can override (with the /C option) this state of thing, to
- set a date format to use on your machine. See the 'Syntax' section.
-
-
- 7. Disclaimer
- -------------
- Even if there is really no possibility for this program to
- damage your data, here is the usual disclaimer message :
-
- As a shareware program, ZDIFF is distributed as-is.
- The author disclaims all warranties, expressed or implied.
- The author will assume no liability for damages either from the
- direct use of this product or as a consequence of it's use.
-
- PKUNZIP, PKUNPAK, ZIP, ARJ, ZOO, PAK, LZH, LHARC, LHA are
- copyrighted by their respective authors.
-
-
- 8. How to contact the author
- ----------------------------
- If you like this program, and plan to use it, you may try it
- during a 21 days period, after what I would appreciate a donation
- from you.
- I develop many tools for my own use, (this one helps me a lot!)
- and I would like to share what I do with others.
- If users gives me money, it will be a proof that my tools are
- useful : in this case, I'll spend time to update them, and
- adding features.
-
- Of course, you can send what you want, but I would like to precise
- that when I want to have a Dollar check paid in my bank, it costs
- me $11 (I live in France). So, if you want to send money, please
- consider this, and send more than $11 ! ($20 would be good)
-
- An other option is sending cash notes in an enveloppe. If you
- can do that, please send about $10 or more.
-
- ** Thanks in advance. **
-
- -------------------------------------------------
- HERE IS MY ADDRESS Christophe Dubourg
- FOR MAIL, CHECKS, or 23, rue Victor Hugo
- CASH : 78370 PLAISIR
- FRANCE
- -------------------------------------------------
-
-
- --> Even if you don't send money, please feel free to send me your
- remarks, suggestions, and specific problems encountered with
- this program.
-
- It will be a pleasure to read your mail and to answer it !
-
- Don't hesitate to contact me, at the following addresses :
-
- ---------------------------------------------------------------
- Compuserve : 76476,550
-
- MCI Mail : CDUBOURG (453-6013)
- or cdubourg@mcimail.com
-
- Internet : cdubourg@borland.com
-
- At home (paper Mail) : Christophe Dubourg
- 23, rue Victor Hugo
- 78370 PLAISIR
- FRANCE
- ---------------------------------------------------------------
-
- Thanks for using ZDiff, I hope it helps. //Christophe D.
-
-